package cn.com.rexen.rplus.sa.model;

import java.util.ArrayList;
import java.util.List;

/**
 * 资源VO.
 * 
 * @author zhanghai
 * 
 */
public class ResourceVO extends BaseVO {

    /**
     * 唯一id.
     */
    private String id;

    /**
     * 资源name.
     */
    private String name;

    /**
     * 父资源名称.
     */
    private String parent;

    /**
     * 父资源id.
     */
    private String parentgroup;

    /**
     * 资源路径.
     */
    private String path;

    /**
     * item,folder
     * 判断是否有下一级.
     * 如是有下一级是folder,否则是 item.
     */
    private String type;

    /**
     * 操作对象集合.
     */
    private List<OperateVO> op = new ArrayList<OperateVO>();

    /**
     * 默认构造方法.
     */
    public ResourceVO() {
        super();
    }

    /**
     * 资源构造方法.
     * 
     * @param id
     *            唯一id.
     * @param name
     *            资源name.
     * @param parent
     *            父资源名称.
     * @param parentgroup
     *            父资源id.
     */
    public ResourceVO(String id, String name, String parent, String parentgroup) {
        super();
        this.id = id;
        this.name = name;
        this.parent = parent;
        this.parentgroup = parentgroup;
    }

    /**
     * @param id
     * @param name
     * @param parent
     * @param parentgroup
     * @param path
     * @param op
     */
    public ResourceVO(String id, String name, String parent, String parentgroup, String path, List<OperateVO> op) {
        super();
        this.id = id;
        this.name = name;
        this.parent = parent;
        this.parentgroup = parentgroup;
        this.path = path;
        this.op = op;
    }

    /**
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the op
     */
    public List<OperateVO> getOp() {
        return op;
    }

    /**
     * @return the parent
     */
    public String getParent() {
        return parent;
    }

    /**
     * @return the parentgroup
     */
    public String getParentgroup() {
        return parentgroup;
    }

    /**
     * @return the path
     */
    public String getPath() {
        return path;
    }

    /**
     * @return the type
     */
    public String getType() {
        return type;
    }

    /**
     * set id.
     * 
     * @param id
     *            the id to set
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * set name.
     * 
     * @param name
     *            the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * set op.
     * 
     * @param op
     *            the op to set
     */
    public void setOp(List<OperateVO> op) {
        this.op = op;
    }

    /**
     * set parent.
     * 
     * @param parent
     *            the parent to set
     */
    public void setParent(String parent) {
        this.parent = parent;
    }

    /**
     * set parentgroup.
     * 
     * @param parentgroup
     *            the parentgroup to set
     */
    public void setParentgroup(String parentgroup) {
        this.parentgroup = parentgroup;
    }

    /**
     * @param path
     *            the path to set
     */
    public void setPath(String path) {
        this.path = path;
    }

    /**
     * @param type
     *            the type to set
     */
    public void setType(String type) {
        this.type = type;
    }

}
